import React from 'react'


/**
 * 类组件的生命周期：
*/

export default class TestLife extends React.Component {
  constructor (props) {
    super(props)
    console.log( '----------constructor----------' )
  }

  componentDidMount () {
    console.log( '----------componentDidMount----------' )
  }

  shouldComponentUpdate () {
    console.log( '----------shouldComponentUpdate----------' )
  }

  componentDidUpdate () {
    console.log( '----------componentDidUpdate----------' )
  }

  componentWillUnmount () {
    console.log( '----------componentWillUnmount----------' )
  }

  render () {
    console.log( '----------render----------' )
    return (
      <div className="container">
        <h2>重点理解生命周期</h2>
      </div>
    )
  }
}